package com.example.kemgdemo.model;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * 学号：1401030048
 * Created by 梁嘉伟 on 2019/7/11
 */

@Getter
@Setter
@Entity(name = "building")
@Table(name = "building")
public class BuildingEntity extends BaseEntity {

    @Column(name = "name")
    private String name;

    @Column(name = "high")
    private Integer high;

    @OneToOne
//todo    @JoinColumn(name = "address_id")
    @PrimaryKeyJoinColumn(name = "building_id", referencedColumnName = "address_id")
    private AddressEntity addressEntity;
}
